package net.pws.oos.biz.model;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "b_attachment")
public class Attachment extends Identifier {
	
	private static final long serialVersionUID = -1525265515285354132L;
	
	public static final String PHOTO_TYPE = "photo";
	public static final String VIDEO_TYPE = "video";
	public static final String DOC_TYPE = "doc";
    
    public static final String ATTACHMENT_ROOT = "/attachments";

    private String type; // photo,video,doc
    
    private String name;
    
	private String description;
    
    @Column(name = "uri_small")
    private String smallUri;
    
    @Column(name = "uri_medium")
    private String mediumUri;
    
    @Column(name = "uri_orig")
    private String orgiUri;
    
    @Column(name = "check_code")
    private String checkCode;
    
    @Column(name = "resource_id")
    private String resourceId;
    
    private BigDecimal longitude;
    
    private BigDecimal latitude;
    
    private BigDecimal altitude;
    
    private BigDecimal temperature;
    
    @Column(name = "create_date")
    private Date createDate;
    
    @Column(name = "upload_date")
    private Date uploadDate;

    /**
     * 父分组Id
     * @see PhotoGroup
     */
    @Column(name = "group_id")
    private String groupId;
    
    /**
     * 子分组Id
     * @see PhotoGroup
     */
    @Column(name = "sub_group_id")
    private String subGroupId;
    
    public String getType() {
        return type;
    }
    
    public void setType(String type) {
        this.type = type;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getSmallUri() {
        return smallUri;
    }
    
    public void setSmallUri(String smallUri) {
        this.smallUri = smallUri;
    }
    
    public String getOrgiUri() {
        return orgiUri;
    }
    
    public void setOrgiUri(String orgiUri) {
        this.orgiUri = orgiUri;
    }
        
    public BigDecimal getLongitude() {
        return longitude;
    }
    
    public void setLongitude(BigDecimal longitude) {
        this.longitude = longitude;
    }
    
    public BigDecimal getLatitude() {
        return latitude;
    }
    
    public void setLatitude(BigDecimal latitude) {
        this.latitude = latitude;
    }
    
    public Date getCreateDate() {
        return createDate;
    }
    
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    
    public Date getUploadDate() {
        return uploadDate;
    }
    
    public void setUploadDate(Date uploadDate) {
        this.uploadDate = uploadDate;
    }

	public BigDecimal getAltitude() {
		return altitude;
	}

	public void setAltitude(BigDecimal altitude) {
		this.altitude = altitude;
	}

	public BigDecimal getTemperature() {
		return temperature;
	}

	public void setTemperature(BigDecimal temperature) {
		this.temperature = temperature;
	}

    public String getMediumUri() {
        return mediumUri;
    }

    public void setMediumUri(String mediumUri) {
        this.mediumUri = mediumUri;
    }

    public String getCheckCode() {
        return checkCode;
    }

    public void setCheckCode(String checkCode) {
        this.checkCode = checkCode;
    }

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getResourceId() {
		return resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getSubGroupId() {
		return subGroupId;
	}

	public void setSubGroupId(String subGroupId) {
		this.subGroupId = subGroupId;
	}
    
}
